<?
if($_POST[action]=="reg_job"||$_POST[action]=="reg_job_q_foremployer"|| $_POST[action]=="reg_job_q_forrecruiter" ||$_POST[action]=="upd_job"){
	  $err = '';

	  if(@sizeof($_POST[jo_contact]) == 0 && $_POST[action]=="reg_job_q_foremployer"){
	  	$err .= "Post To must select one from the list<br>";
	  }
      if($_POST[jo_copname]==''){
	      $err .= "Company name is required<br>";
	  }
	  if($_POST[jo_type]=='0'){
	      $err .= "Job type must select one from the list<br>";
	  }
      if($_POST[jo_vdate]==''){
	     // $err .= "Job valid by date is required<br>";
	  } 
	  if($_POST[jo_cat]=='0'){
	     $err .= "Job category must select one from the list<br>";
	  }
      if($_POST[jo_status]=='0'){
	      $err .= "Job status must select one from the list<br>";
	  }
	  if($_POST[jo_priority]=='0'){
	     // $err .= "Job priority must select one from the list<br>";
	  }
	  if($_POST[jo_category]=='0'){
	      $err .= "Job industry must select one from the list<br>";
	  }
	  if($_POST[jo_function]=='0'){
	      $err .= "Job function must select one from the list<br>";
	  }
      if($_POST[jo_title]==''){
	      $err .= "Job Title is required<br>";
	  }
      if($_POST[jo_positions]==''){
	    //  $err .= "No. of open positions is required<br>";
	  } 
//	  if($_POST[jo_salrange]==''){
//	      $err .= "Compensation is required<br>";
//	  }
//	  if($_POST[jo_salrange]=='0'){
//	      $err .= "Annual base salary range must select one from the list<br>";
//	  }
	  if($_POST[jo_address]==''){
	      $err .= "Work Address is required<br>";
	  } 
      if($_POST[jo_city]==''){
	      $err .= "Location city is required<br>";
	  } 

	  if($_POST[jo_state]=='0'){
	      $err .= "Location state must select one from the list<br>";
	  }
	  if($_POST[jo_country]=='0'){
	      $err .= "Location country must select one from the list<br>";
	  }
	  if($_POST[jo_zip]==''){
	      $err .= "Location zip code is required<br>";
	  }
	  if($_POST[jo_howfar]=='0'){
	     // $err .= "How far from company location must select one from the list<br>";
	  }
	  if($_POST[jo_jobtravel]=='0'){
	     // $err .= "Job travel requirement must select one from the list<br>";
	  }
	  if($_POST[jo_mer]==''){
	     // $err .= "Minimum education requirement is required<br>";
	  }
	  if($_POST[jo_myrwe]=='0'){
	     // $err .= "Minimum years of relevant work experience must select one from the list<br>";
	  }
	  if($_POST[jo_ypme]=='0'){
	     // $err .= "Years of people management experience must select one from the list<br>";
	  }
      if($_POST[jo_yplr]=='0'){
	    //  $err .= "Years of profit & loss responsibility must select one from the list<br>";
	  }
	  if($_POST[jo_authorized]==''){
	      //$err .= "Authorized to work in location is required<br>";
	  }
	  if($_POST[jo_description]==''){
	      $err .= "Job description is required<br>";
	  }
//	  if(empty($_POST[jo_contact])){
//	      $err .= "Contact Guideline is required<br>";
//	  }
	  if(!PhpCaptcha::Validate($_POST['imagecode'])){
		 // $err .= "Invalid Safe Code.  Please try again.";
	  }
	  if($err == '' ){
			 if($_POST[action]=="upd_job"){
			      include("./insert_do/job_update.php");
			 }else{
				  include("./insert_do/job_insert.php");
			 }
	  }
}
?>